import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/components/Layout'
import Home from '@/components/page/Home'
import Face from '@/components/page/Face'

import Scene1 from '@/components/page/Scene1'
import Scene2 from '@/components/page/Scene2'
import Scene3 from '@/components/page/Scene3'
import Scene4 from '@/components/page/Scene4'
import Scene5 from '@/components/page/Scene5'
import Scene6 from '@/components/page/Scene6'

import Patent from '@/components/page/Patent'

//demo展示
import Demo from '@/components/Demo'
import Breath from '@/components/demo/Breath'

Vue.use(Router)

export default new Router({
	linkActiveClass: 'active',
	routes: [{
			path: '/',
			name: 'hospital',
			component: Demo,
			children: [
				{ path: '/hospital', component: Breath, name: '呼吸捕捉' },
				// { path: '/breath', component: Breath, name: '呼吸捕捉' }
			]
		},
		// {
		// 	path: '/',
		// 	name: 'superd3d',
		// 	component: Layout,
		// 	redirect: { path: '/index' },
		// 	children: [
		// 		{ path: '/scene/zhinengtanshang', component: Scene1, name: '智能探伤' },
		// 		{ path: '/scene/weilaiyanjing', component: Scene2, name: '未来眼镜' },
		// 		{ path: '/scene/fuyanshijie', component: Scene3, name: '复眼视界' },
		// 		{ path: '/scene/dongzuobuzhuo', component: Scene4, name: '动作捕捉' },
		// 		{ path: '/scene/qingxiesheying', component: Scene5, name: '摄影建模' },
		// 		{ path: '/scene/litishichuang', component: Scene6, name: '立体视窗' },
		// 		{ path: '/patent', component: Patent, name: '专利布局' },
		// 		{ path: '/index', component: Home, name: '首页' },
		// 		// { path: '/technology', component: Face, name: '人脸识别' }
		// 	]
		// },
		// {
		// 	path: '/',
		// 	name: 'technology',
		// 	component: Layout,
		// 	children: [
		// 		{ path: '/technology', component: Face, name: '人脸识别' }
		// 	]
		// }
		{
			path: '*',
			auth: false,
			hidden: true,
			// redirect: { path: '/hospital/breath' }
		}
	],
	scrollBehavior(to, from, savedPosition) {
		// return 期望滚动到哪个的位置
		return { x: 0, y: 0 }
	}
})
